Filtering on Layout DXL Column

Hi all,

I'm trying to create an aggregate Layout DXL column that'll calculate the results of several other columns and display an appropriate result, e.g.
 

1        2           Aggregate
False    False       False
True     False       False
True     True        True

 


That's pretty simple, but because it'll be used in some pretty large views I wanted to make it striking by changing the background colour using something like the following code;

 

 

 

DBE canvs = getCanvas()
 
if (!null canvs)
{
    if ((obj."1" "" == "True") && (obj."2" "" == "True")) 
        {
                background(canvs, 29)
                realColor(canvs, realColor_White )
                displayRich "{\\b True }" 
        }
        else
        {
                background(canvs, 13)
                realColor(canvs, realColor_Black )
                displayRich "{\\b False }"
        }
}



That displays fine, but I'm unable to do any column filtering on this layout DXL column. Commenting out reference to the canvas solves this problem, but leaves me without the 'impact' I was looking for.

Does anybody have any ideas that'll allow me to have both my coloured background AND the ablity to filter (e.g. just for 'True')?
TIA.



 

 


Ian_F - Fri Oct 29 04:53:14 EDT 2010

Re: Filtering on Layout DXL Column
SystemAdmin - Fri Oct 29 07:06:32 EDT 2010

Well, the canvas is null when you filter the module, so let's accept that:
 

DBE canvs = getCanvas()
 
if (!null canvs)
{
    if ((obj."1" "" == "True") && (obj."2" "" == "True")) 
        {
                background(canvs, 29)
                realColor(canvs, realColor_White )
                displayRich "{\\b True }" 
        }
        else
        {
                background(canvs, 13)
                realColor(canvs, realColor_Black )
                displayRich "{\\b False }"
        }
}
else
{
        if ((obj."1" "" == "True") && (obj."2" "" == "True")) 
        {
                displayRich "{\\b True }"       
        }
        else
        {
                displayRich "{\\b False }"
        }
}

 


Allows you to filter based on columns and also works for exports.

 

Re: Filtering on Layout DXL Column
Ian_F - Mon Nov 01 05:48:00 EDT 2010

SystemAdmin - Fri Oct 29 07:06:32 EDT 2010

Well, the canvas is null when you filter the module, so let's accept that:
 

DBE canvs = getCanvas()
 
if (!null canvs)
{
    if ((obj."1" "" == "True") && (obj."2" "" == "True")) 
        {
                background(canvs, 29)
                realColor(canvs, realColor_White )
                displayRich "{\\b True }" 
        }
        else
        {
                background(canvs, 13)
                realColor(canvs, realColor_Black )
                displayRich "{\\b False }"
        }
}
else
{
        if ((obj."1" "" == "True") && (obj."2" "" == "True")) 
        {
                displayRich "{\\b True }"       
        }
        else
        {
                displayRich "{\\b False }"
        }
}

 


Allows you to filter based on columns and also works for exports.

 

Ouch! Knew it would be obvious once I had the solution in front of me! ;-)
Thanks for that.